package com.xhh.nphm.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhh.nphm.system.domain.MmailWorkLogEty;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface MmailWorkLogDao extends BaseMapper<MmailWorkLogEty> {
    /**
     * 切换公开状态
     *
     * @param logId 日志id
     * @return 影响行数
     */
    @Update("update mMailWorkLog SET WsOpen = (CASE WHEN WsOpen = 0 THEN 1 ELSE 0 END) where LogId = #{0} and isDel = 0")
    int updateState(Integer logId);
}
